package com.picturestory.client.android;

import com.picturestory.client.android.util.Constants;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.view.Window;
import android.widget.TextView;

public class Status extends Activity {

	private static final String TAG = Status.class.getSimpleName();
	
	private TextView mDeviceSN;
	private TextView mPhoneNumber;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		Log.i(Constants.LOGTAG, " " + TAG + " is on create");
        
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.status);
        
        mDeviceSN = (TextView) findViewById(R.id.deviceSN);
        mPhoneNumber = (TextView) findViewById(R.id.phoneNumber);
	}

	@Override
	protected void onStart() {
		// TODO Auto-generated method stub
		super.onStart();
		
		TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
		mDeviceSN.setText(tm.getDeviceId());
		mPhoneNumber.setText("+" + tm.getNetworkCountryIso() + "-" + tm.getLine1Number());
		
	}

	
}
